package com.school.zhaoban.service.impl;

import com.school.zhaoban.pojo.College;
import com.school.zhaoban.mapper.CollegeMapper;
import com.school.zhaoban.service.CollegeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 又菜又爱玩
 * @since 2022-02-23
 */
@Service
public class CollegeServiceImpl extends ServiceImpl<CollegeMapper, College> implements CollegeService {

    @Override
    public List<College> findAll() {
        return baseMapper.selectList(null);
    }

    @Override
    public int saveCollege(College college) {
        int i = baseMapper.insert(college);
        return i;
    }

    @Override
    public int updateByID(College college) {
        int i = baseMapper.updateById(college);
        return i;
    }
}
